package com.kkm.pojo;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Order {
    private int id;
    private long oid;
    private int total;
    private int flag;
    private String orderFlag;
    private String flagStr;
    private Date orderTime;
    private String timeStr;
    private String username;
    private String address;

    public String getTimeStr() {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat( "YYYY-MM-dd");
        String str = simpleDateFormat.format(orderTime);
        return str;
    }

    public void setTimeStr(String timeStr) {
        this.timeStr = timeStr;
    }


    public Order() {
    }

    public Order(int id, long oid, int total, int flag,
                 String orderFlag, String flagStr, Date orderTime, String timeStr, String username, String address) {
        this.id = id;
        this.oid = oid;
        this.total = total;
        this.flag = flag;
        this.orderFlag = orderFlag;
        this.flagStr = flagStr;
        this.orderTime = orderTime;
        this.timeStr = timeStr;
        this.username = username;
        this.address = address;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public long getOid() {
        return oid;
    }

    public void setOid(long oid) {
        this.oid = oid;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getFlag() {
        return flag;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }

    public String getFlagStr() {
        return flagStr;
    }

    public void setFlagStr(String flagStr) {
        this.flagStr = flagStr;
    }

    public Date getOrderTime() {

        return orderTime;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getOrderFlag() {
        return orderFlag;
    }

    public void setOrderFlag(String orderFlag) {
        this.orderFlag = orderFlag;
    }
}
